'use strict';

module.exports = {
  // 方法扩展
  currentTime() {
    return getTime();
  },
  // 属性扩展
  get timeProp() {
    return getTime();
  },
};

function getTime() {
  const now = new Date();
  const y = now.getFullYear();
  const m = now.getMonth() + 1;
  const d = now.getDay();
  const nowTime = y + '年' + m + '月' + d + '日';
  return nowTime;
}
